<template>
    <component is="a-modal" v-model:visible="visible" width="70%" :title="title" :mask-closable="false"
        :ok-loading="loading" @cancel="close" >
        <div style="height: 70vh;overflow-y: scroll;">
            <a-table :pagination="false" :columns="columns" :data="paramsData.data" :stripe="true"
                style="margin-top:10px">
                <template #goods_name="{ record }">
                    <div>{{ record.goods_name }}({{ record.goods_type_text }})</div>
                </template>
                <template #price="{ record }">
                    <div>{{ record.price }} <text v-if="record.goods_type != 'common' && record.goods_type != 'common2'">¥{{
                            record.price_cny }}</text></div>
                </template>
            </a-table>
        
        </div>




    </component>
</template>
<script setup>
import { onMounted, ref, reactive, computed, watch } from 'vue'
import mallApi from '@/api/system/mall'
import { Message } from '@arco-design/web-vue'
import { throttle } from 'lodash';
import tool from '@/utils/tool'
const emit = defineEmits(["success"]);
const visible = ref(false);
const title = ref('物流信息')
const loading = ref(false);
const formData = reactive({
    id:''
})
const columns = [
    { title: '创建时间', dataIndex: 'create_time', width: 100, align: 'center' },
    { title: '物流', dataIndex: 'content', width: 500, align: 'center' },
]

const open = async (data) => {
    formData.id = data
    visible.value = true;
    getParams()
}
const paramsData = ref({})
const getParams = async () => {
    const { data } = await mallApi.mall_express_info(formData.id)
    paramsData.value = { ...data }
}
defineExpose({ open });
</script>